package tec.stan.ling.core.notifier.impl;

import tec.stan.ling.core.notifier.Notification;

/**
 * An extensible notification implementation.
 * 
 * @author Stan 张新潮
 * @date Jan 13, 2010
 */
public class NotificationImpl implements Notification {

	private Object notifier;

	private int eventType;

	private String featureID;

	private Object oldValue;

	private Object newValue;

	public NotificationImpl(Object notifier, int eventType, String featureID,
			Object oldValue, Object newValue) {
		this.notifier = notifier;
		this.eventType = eventType;
		this.featureID = featureID;
		this.oldValue = oldValue;
		this.newValue = newValue;
	}

	@Override
	public int getEventType() {
		return eventType;
	}

	@Override
	public String getFeature() {
		return featureID;
	}

	@Override
	public Object getNotifier() {
		return notifier;
	}

	@Override
	public Object getNewValue() {
		return newValue;
	}

	@Override
	public Object getOldValue() {
		return oldValue;
	}
}
